#pragma once
namespace graph_virtual
{
   namespace math
   {
      inline graph_basic::point_t edge_middle_point(graph_basic::edge_t const &  e, virtual_graph_t& g)
      {
          graph_basic::vertex_t& source_v = source(e, g);
          graph_basic::vertex_t& target_v = target(e, g);
          
          return graph_basic::point_t( 
               static_cast<graph_basic::lat_lon_t>(0.5*(source_v.get_point().lat_ + target_v.get_point().lat_)),
               static_cast<graph_basic::lat_lon_t>(0.5*(source_v.get_point().lon_ + target_v.get_point().lon_))
              );
      }
   }
}